home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / S-Sh / SetKeyboard.cpt / SetKeyboard / card_3135.txt < prev    next >
Text File  |  1990-03-04  |  11KB  |  429 lines

  1. -- card: 3135 from stack: in
  2. -- bmap block id: 3446
  3. -- flags: 0000
  4. -- background id: 2636
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on openStack
  8.   click at loc of btn "Help"
  9. end openStack
  10.  
  11. on closeStack
  12.   click at loc of btn "SetKeyboard Normal"
  13. end closeStack
  14.  
  15. on controlKey id
  16.   put id into cd fld "Hit"
  17. end controlKey
  18.  
  19. on functionKey id
  20.   put "F" & id into cd fld "Hit"
  21. end functionKey
  22.  
  23.  
  24.  
  25. -- part 1 (button)
  26. -- low flags: 00
  27. -- high flags: C006
  28. -- rect: left=0 top=234 right=251 bottom=141
  29. -- title width / last selected line: 0
  30. -- icon id / first selected line: 0 / 0
  31. -- text alignment: 1
  32. -- font id: 3
  33. -- text size: 10
  34. -- style flags: 256
  35. -- line height: 13
  36. -- part name: SetKeyboard Normal
  37. ----- HyperTalk script -----
  38. on mouseUp
  39.   SetKeyboard Normal
  40.   set the hilite of me to true
  41.   set the hilite of btn "SetKeyboard MapBoth" to false
  42.   set the hilite of btn "SetKeyboard MapCommand" to false
  43.   set the hilite of btn "SetKeyboard MapNumeric" to false
  44.   set the hilite of btn "SetKeyboard LockControl" to false
  45.   put "" into cd fld "Hit"
  46. end mouseUp
  47.  
  48.  
  49.  
  50. -- part 3 (button)
  51. -- low flags: 00
  52. -- high flags: 8006
  53. -- rect: left=0 top=59 right=76 bottom=164
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 0 / 0
  56. -- text alignment: 1
  57. -- font id: 3
  58. -- text size: 10
  59. -- style flags: 256
  60. -- line height: 13
  61. -- part name: SetKeyboard LockControl
  62. ----- HyperTalk script -----
  63. on mouseUp
  64.   SetKeyboard LockControl
  65.   set the hilite of me to true
  66.   set the hilite of btn "SetKeyboard MapBoth" to false
  67.   set the hilite of btn "SetKeyboard MapCommand" to false
  68.   set the hilite of btn "SetKeyboard MapNumeric" to false
  69.   set the hilite of btn "SetKeyboard Normal" to false
  70.   put "" into cd fld "Hit"
  71. end mouseUp
  72.  
  73.  
  74.  
  75. -- part 5 (button)
  76. -- low flags: 00
  77. -- high flags: 8006
  78. -- rect: left=0 top=115 right=132 bottom=171
  79. -- title width / last selected line: 0
  80. -- icon id / first selected line: 0 / 0
  81. -- text alignment: 1
  82. -- font id: 3
  83. -- text size: 10
  84. -- style flags: 256
  85. -- line height: 13
  86. -- part name: SetKeyboard MapCommand
  87. ----- HyperTalk script -----
  88. on mouseUp
  89.   SetKeyboard MapCommand
  90.   set the hilite of me to true
  91.   set the hilite of btn "SetKeyboard MapBoth" to false
  92.   set the hilite of btn "SetKeyboard LockControl" to false
  93.   set the hilite of btn "SetKeyboard MapNumeric" to false
  94.   set the hilite of btn "SetKeyboard Normal" to false
  95.   put "" into cd fld "Hit"
  96. end mouseUp
  97.  
  98.  
  99.  
  100. -- part 7 (field)
  101. -- low flags: 01
  102. -- high flags: 0001
  103. -- rect: left=217 top=23 right=51 bottom=466
  104. -- title width / last selected line: 0
  105. -- icon id / first selected line: 0 / 0
  106. -- text alignment: 0
  107. -- font id: 3
  108. -- text size: 10
  109. -- style flags: 0
  110. -- line height: 13
  111. -- part name: 
  112.  
  113.  
  114. -- part 8 (field)
  115. -- low flags: 81
  116. -- high flags: 0000
  117. -- rect: left=27 top=61 right=321 bottom=481
  118. -- title width / last selected line: 0
  119. -- icon id / first selected line: 0 / 0
  120. -- text alignment: 1
  121. -- font id: 0
  122. -- text size: 12
  123. -- style flags: 0
  124. -- line height: 16
  125. -- part name: Click to continue…
  126.  
  127.  
  128. -- part 16 (button)
  129. -- low flags: 00
  130. -- high flags: 0001
  131. -- rect: left=479 top=50 right=75 bottom=507
  132. -- title width / last selected line: 0
  133. -- icon id / first selected line: 25002 / 25002
  134. -- text alignment: 1
  135. -- font id: 0
  136. -- text size: 12
  137. -- style flags: 0
  138. -- line height: 16
  139. -- part name: Help
  140. ----- HyperTalk script -----
  141. on mouseUp
  142.   PopupField "card field" && quote & "Click to continue‚Ķ" & quote
  143. end mouseUp
  144.  
  145.  
  146.  
  147. -- part 17 (button)
  148. -- low flags: 00
  149. -- high flags: 0000
  150. -- rect: left=478 top=25 right=48 bottom=505
  151. -- title width / last selected line: 0
  152. -- icon id / first selected line: 21700 / 21700
  153. -- text alignment: 1
  154. -- font id: 0
  155. -- text size: 12
  156. -- style flags: 0
  157. -- line height: 16
  158. -- part name: New Button
  159. ----- HyperTalk script -----
  160. on mouseUp
  161.   go home
  162. end mouseUp
  163.  
  164.  
  165.  
  166. -- part 18 (button)
  167. -- low flags: 00
  168. -- high flags: 0000
  169. -- rect: left=369 top=35 right=50 bottom=463
  170. -- title width / last selected line: 0
  171. -- icon id / first selected line: 0 / 0
  172. -- text alignment: 1
  173. -- font id: 0
  174. -- text size: 12
  175. -- style flags: 0
  176. -- line height: 16
  177. -- part name: Popupfield
  178. ----- HyperTalk script -----
  179. on mouseUp
  180.   Popupfield "card field Popup"
  181. end mouseUp
  182.  
  183.  
  184.  
  185. -- part 19 (field)
  186. -- low flags: 81
  187. -- high flags: 0001
  188. -- rect: left=220 top=38 right=82 bottom=462
  189. -- title width / last selected line: 0
  190. -- icon id / first selected line: 0 / 0
  191. -- text alignment: 0
  192. -- font id: 3
  193. -- text size: 10
  194. -- style flags: 0
  195. -- line height: 13
  196. -- part name: Popup
  197.  
  198.  
  199. -- part 21 (field)
  200. -- low flags: 01
  201. -- high flags: 0000
  202. -- rect: left=16 top=131 right=159 bottom=502
  203. -- title width / last selected line: 0
  204. -- icon id / first selected line: 0 / 0
  205. -- text alignment: 0
  206. -- font id: 3
  207. -- text size: 10
  208. -- style flags: 0
  209. -- line height: 13
  210. -- part name: 
  211.  
  212.  
  213. -- part 23 (field)
  214. -- low flags: 01
  215. -- high flags: 0000
  216. -- rect: left=16 top=75 right=116 bottom=502
  217. -- title width / last selected line: 0
  218. -- icon id / first selected line: 0 / 0
  219. -- text alignment: 0
  220. -- font id: 3
  221. -- text size: 10
  222. -- style flags: 0
  223. -- line height: 13
  224. -- part name: 
  225.  
  226.  
  227. -- part 24 (field)
  228. -- low flags: 01
  229. -- high flags: 0000
  230. -- rect: left=16 top=251 right=279 bottom=506
  231. -- title width / last selected line: 0
  232. -- icon id / first selected line: 0 / 0
  233. -- text alignment: 0
  234. -- font id: 3
  235. -- text size: 10
  236. -- style flags: 0
  237. -- line height: 13
  238. -- part name: 
  239.  
  240.  
  241. -- part 26 (field)
  242. -- low flags: 01
  243. -- high flags: 0000
  244. -- rect: left=2 top=278 right=294 bottom=113
  245. -- title width / last selected line: 0
  246. -- icon id / first selected line: 0 / 0
  247. -- text alignment: 0
  248. -- font id: 3
  249. -- text size: 10
  250. -- style flags: 256
  251. -- line height: 13
  252. -- part name: 
  253.  
  254.  
  255. -- part 27 (field)
  256. -- low flags: 01
  257. -- high flags: 0001
  258. -- rect: left=391 top=298 right=314 bottom=459
  259. -- title width / last selected line: 0
  260. -- icon id / first selected line: 0 / 0
  261. -- text alignment: 0
  262. -- font id: 3
  263. -- text size: 10
  264. -- style flags: 0
  265. -- line height: 13
  266. -- part name: 
  267.  
  268.  
  269. -- part 29 (field)
  270. -- low flags: 01
  271. -- high flags: 0001
  272. -- rect: left=458 top=298 right=314 bottom=486
  273. -- title width / last selected line: 0
  274. -- icon id / first selected line: 0 / 0
  275. -- text alignment: 0
  276. -- font id: 3
  277. -- text size: 10
  278. -- style flags: 0
  279. -- line height: 13
  280. -- part name: Hit
  281.  
  282.  
  283. -- part 31 (field)
  284. -- low flags: 01
  285. -- high flags: 0000
  286. -- rect: left=16 top=174 right=204 bottom=504
  287. -- title width / last selected line: 0
  288. -- icon id / first selected line: 0 / 0
  289. -- text alignment: 0
  290. -- font id: 3
  291. -- text size: 10
  292. -- style flags: 0
  293. -- line height: 13
  294. -- part name: 
  295.  
  296.  
  297. -- part 33 (field)
  298. -- low flags: 01
  299. -- high flags: 0000
  300. -- rect: left=16 top=219 right=236 bottom=505
  301. -- title width / last selected line: 0
  302. -- icon id / first selected line: 0 / 0
  303. -- text alignment: 0
  304. -- font id: 3
  305. -- text size: 10
  306. -- style flags: 0
  307. -- line height: 13
  308. -- part name: 
  309.  
  310.  
  311. -- part 34 (button)
  312. -- low flags: 00
  313. -- high flags: 8006
  314. -- rect: left=0 top=158 right=175 bottom=169
  315. -- title width / last selected line: 0
  316. -- icon id / first selected line: 0 / 0
  317. -- text alignment: 1
  318. -- font id: 3
  319. -- text size: 10
  320. -- style flags: 256
  321. -- line height: 13
  322. -- part name: SetKeyboard MapNumeric
  323. ----- HyperTalk script -----
  324. on mouseUp
  325.   SetKeyboard MapNumeric
  326.   set the hilite of me to true
  327.   set the hilite of btn "SetKeyboard MapBoth" to false
  328.   set the hilite of btn "SetKeyboard MapCommand" to false
  329.   set the hilite of btn "SetKeyboard LockControl" to false
  330.   set the hilite of btn "SetKeyboard Normal" to false
  331.   put "" into cd fld "Hit"
  332. end mouseUp
  333.  
  334.  
  335.  
  336. -- part 35 (button)
  337. -- low flags: 00
  338. -- high flags: 8006
  339. -- rect: left=0 top=202 right=219 bottom=156
  340. -- title width / last selected line: 0
  341. -- icon id / first selected line: 0 / 0
  342. -- text alignment: 1
  343. -- font id: 3
  344. -- text size: 10
  345. -- style flags: 256
  346. -- line height: 13
  347. -- part name: SetKeyboard MapBoth
  348. ----- HyperTalk script -----
  349. on mouseUp
  350.   SetKeyboard MapBoth
  351.   set the hilite of me to true
  352.   set the hilite of btn "SetKeyboard LockControl" to false
  353.   set the hilite of btn "SetKeyboard MapCommand" to false
  354.   set the hilite of btn "SetKeyboard MapNumeric" to false
  355.   set the hilite of btn "SetKeyboard Normal" to false
  356.   put "" into cd fld "Hit"
  357. end mouseUp
  358.  
  359.  
  360.  
  361. -- part 38 (field)
  362. -- low flags: 01
  363. -- high flags: 0000
  364. -- rect: left=16 top=293 right=322 bottom=374
  365. -- title width / last selected line: 0
  366. -- icon id / first selected line: 0 / 0
  367. -- text alignment: 0
  368. -- font id: 3
  369. -- text size: 10
  370. -- style flags: 0
  371. -- line height: 13
  372. -- part name: 
  373.  
  374.  
  375. -- part contents for card part 7
  376. ----- text -----
  377. SetKeyboard is a replacement for my ControlLock XCMD. This stack also uses my Popupfield‚Ć XCMD.
  378.  
  379. -- part contents for card part 8
  380. ----- text -----
  381. XCMDs ¬© 1990, Nigel Perry; portions ¬© Symantec Inc.
  382. Permission is granted for non-commercial use only, they may NOT be used in any stack which is sold or provided as an incentive to purchase some other product (this includes "ShareWare" stacks) unless permission is first obtained from the author.
  383.  
  384. Comments, suggestions, bugs, postcards (a la "HappiWare") to:
  385.  
  386. Nigel Perry
  387. Department of Computing
  388. Imperial College of Science, Technology and Medicine
  389. 180, Queens Gate
  390. London SW7
  391. England
  392.  
  393. Enjoy!
  394.  
  395. -- part contents for card part 19
  396. ----- text -----
  397. You can either guess how to use this XCMD or look in the stack "XCMD Miscellany" - available from the info-mac and other archives. (Click)
  398.  
  399. -- part contents for card part 23
  400. ----- text -----
  401. This command will ‚Äúlock‚Äù the control-key, even if your keyboard doesn't have one! After use for non-command key combinations a ‚ÄúcontrolKey <num>‚Äù message will be sent. Command-key combinations are not affected so menu commands still work.
  402.  
  403. -- part contents for card part 21
  404. ----- text -----
  405. This causes command-key combinations to be mapped to control-key ones. Keyboard menu commands will not work in this case. (This mode was suggested by Eric Kofoid.)
  406.  
  407. -- part contents for card part 24
  408. ----- text -----
  409. This reverts the keyboard to its normal state, ALWAYS remember to do this or you might get into trouble! The ‚ÄúcloseStack‚Äù handler of this card issues this command just in case you forget.
  410.  
  411. -- part contents for card part 26
  412. ----- text -----
  413. SetKeyboard FKEY
  414.  
  415. -- part contents for card part 27
  416. ----- text -----
  417. Id of key hit:
  418.  
  419. -- part contents for card part 31
  420. ----- text -----
  421. This causes the numeric keypad keys 1 -> 9 to be mapped into F1 -> F9, thus ‚ÄúfunctionKey <num>‚Äù messages are sent.
  422.  
  423. -- part contents for card part 33
  424. ----- text -----
  425. Combines ‚ÄúMapCommand‚Äù and ‚ÄúMapNumeric‚Äù.
  426.  
  427. -- part contents for card part 38
  428. ----- text -----
  429. So it can be used outside of HyperCard SetKeyboard is also supplied in this stack as FKEY 0 (you may renumber it).